import type { RouteRecordRaw } from 'vue-router';
/**
 * 静态路由（默认路由）
 */
export const staticRoutes: Array<RouteRecordRaw> = [
    {
        // 首页
        path: '/',
        redirect: '/home',
        meta: {
            hidden: true
        },
        children: [{
            path: 'home',
            name: 'Home',
            component: () => import('@/vivew/index/index.vue'),
        }]
    },
    {
        // 分类
        path: '/item',
        redirect: '/item/cateList',
        meta: {
            hidden: true
        },
        children: [
            {
                path: "cateList",
                component: () => import('@/vivew/pages/index.vue'),
            },
        ]
    },
    {
        // 值得买
        path: '/topic',
        redirect: '/topic/index/',
        meta: {
            hidden: true
        },
        children: [
            {
                path: "index",
                component: () => import('@/vivew/topic/index.vue'),
            },
        ]
    },
    {
        // 购物车
        path: '/card',
        component: () => import('@/vivew/cart/index.vue'),
        meta: {
            hidden: true
        },
        children: [
            {
                path: "index",
                component: () => import('@/vivew/cart/index.vue'),
            },

        ]
    },
    {
        // 搜索页
        path: '/search',
        redirect: '/search/index/',
        children: [
            {
                path: "index",
                component: () => import('@/vivew/search/index.vue'),
            },
            {
                path:"SearchDetail",
                component:()=> import('@/vivew/search/components/SearchDetail/index.vue')
            }

        ]
    },
    {
        // 登录页
        path: '/login',
        name: 'Login',
        meta: {
            hidden: false
        },
        component: () => import('../components/login/index.vue')
    },
    {
        // 个人
        path: '/person',
        meta: {
            hidden: true
        },
        // redirect: '/person/index/',
        component: () => import('@/vivew/person/index.vue'),

    }


    /* 匹配任意的路由 必须最后注册 */

];
